package com.project.vocabulary.controller;

import com.project.vocabulary.model.Word;
import com.project.vocabulary.service.WordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * Description:
 *
 * @author : luyao.duan
 * @since : 2019-10-26 19:53:48
 **/
@RestController
public class WordController {

    @Autowired
    private WordService wordService;

    @GetMapping("/getWord")
    public List<Word> getWordList(){
        return wordService.getWordList();
    }

    @GetMapping("/getWords")
    public Map getWords(){
        return wordService.getResult();
    }
}
